package com.iris.live.services.common.reconsitution;

/**
 * yitianle
 * message类型
 * 2017/2/23.
 */
public class MessageType {

    public static final int MSG_TYPE_SYSTEM = 1;//系统
    public static final int MSG_TYPE_ORDER = 2;//订单
    public static final int MSG_TYPE_FINANCE = 3;//金融
    public static final int MSG_TYPE_INSURANCE = 4;//保险
    public static final int MSG_TYPE_THREAD = 5;//线索
    public static final int MSG_TYPE_LOGISTICS = 6;//物流
    public static final int MSG_TYPE_CONTRACT = 7;//合同
    public static final int MSG_TYPE_MARKER = 8;//市场
    public static final int MSG_TYPE_BACKMARKER = 9;//后市场
    public static final int MSG_TYPE_SHUNTING_IN = 10;//调车调入
    public static final int MSG_TYPE_SHUNTING_OUT= 11;//调车调出
    public static final int MSG_TYPE_RECOMMEND = 12;//推荐
    public static final int MSG_TYPE_APPOINTMENT = 13;//预约
    public static final int MSG_TYPE_FINANCE_SYS =14;//财务
    public static final int MSG_TYPE_CHECK_SOURCE =15;//资源确认
    public static final int MSG_TYPE_ADMINISTRATIVE =16;//行政
    public static final int MSG_TYPE_COMPLAINT =17;//投诉




    /**
     * 枚举
     */
    public static enum Type {
        MSG_TYPE_SYSTEM("系统", MessageType.MSG_TYPE_SYSTEM),
        MSG_TYPE_ORDER("订单", MessageType.MSG_TYPE_ORDER),
        MSG_TYPE_FINANCE("金融", MessageType.MSG_TYPE_FINANCE),
        MSG_TYPE_INSURANCE("保险", MessageType.MSG_TYPE_INSURANCE),
        MSG_TYPE_THREAD("线索", MessageType.MSG_TYPE_THREAD),
        MSG_TYPE_LOGISTICS("物流", MessageType.MSG_TYPE_LOGISTICS),
        MSG_TYPE_CONTRACT("合同", MessageType.MSG_TYPE_CONTRACT),
        MSG_TYPE_MARKER("市场", MessageType.MSG_TYPE_MARKER),
        MSG_TYPE_BACKMARKER("后市场", MessageType.MSG_TYPE_BACKMARKER),
        MSG_TYPE_SHUNTING_IN("调车调入", MessageType.MSG_TYPE_SHUNTING_IN),
        MSG_TYPE_SHUNTING_OUT("调车调出", MessageType.MSG_TYPE_SHUNTING_OUT),
        MSG_TYPE_RECOMMEND("推荐", MessageType.MSG_TYPE_RECOMMEND),
        MSG_TYPE_APPOINTMENT("预约", MessageType.MSG_TYPE_APPOINTMENT),
        MSG_TYPE_FINANCE_SYS("财务", MessageType.MSG_TYPE_FINANCE_SYS),
        MSG_TYPE_CHECK_SOURCE("资源确认", MessageType.MSG_TYPE_CHECK_SOURCE),
        MSG_TYPE_ADMINISTRATIVE("行政", MessageType.MSG_TYPE_ADMINISTRATIVE),
        MSG_TYPE_SURVEY("投诉", MessageType.MSG_TYPE_COMPLAINT);


        private String name;
        private int index;

        // 构造方法
        private Type(String name, int index) {
            this.name = name;
            this.index = index;
        }

        // 普通方法
        public static String getName(int index) {
            for (Type c : Type.values()) {
                if (c.index == index) {
                    return c.name;
                }
            }
            return null;
        }
    }




}
